#include "item.h"
#include <QPixmap>
#include <QSound>

item::item()
{
    this->setPixmap(QPixmap(":/bg/pic/gaoshu.jpg"));
    this->start = 0;
    this->mouse = 0;
}

void item::setPic(QString path)
{
    this->setPixmap(QPixmap(path));
}

void item::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
    if(this->isStart()){
        if(this->isMouse()){
//meizhong

        }
        else{
//zhongle
             this->setPixmap(QPixmap(":/bg/pic/gelin.jpg"));
        }
    }
}

void item::setMouse(bool mouse)
{
    this->mouse = mouse;
}

bool item::isMouse()
{
    return this->mouse;
}

void item::setStart(bool start)
{
    this->start = start;
}

bool item::isStart()
{
    return this->start;
}
